package com.fengli.task.uitl.validation.validator;

import com.fengli.task.entity.TaskEntity;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

/**
 * 用于校验TaskEntity类
 * @Description:
 * @Author: fengli
 * @Date 4/24/19 9:37 AM
 */
public class TaskValidator implements Validator {
    @Override
    public boolean supports(Class<?> aClass) {
        return TaskEntity.class.isAssignableFrom(aClass);
    }

    @Override
    public void validate(Object o, Errors errors) {
        /*todo 进行参数校验*/

    }
}
